#!/bin/bash
#for Ralink MT751020 SOC, youhua pt622g, pt632g
export PATH=$PATH:/projects/youhua/mips-linux-uclibc/usr/bin
export CROSSCOMPILE="mips-linux-uclibc-"
#export ENV_LDFLAGS=/opt/trunk/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libatomic.a
export HOST=mips
export DEVNAME=pt622g
export HTTPS_SUPPORT=1
export USE_WOLFSSL=1
export ENV_CFLAGS="--sysroot=/projects/youhua/mips-linux-uclibc/"
export CFLAGS="--sysroot=/projects/youhua/mips-linux-uclibc/"
export ENV_LDFLAGS="--sysroot=/projects/youhua/mips-linux-uclibc/"


if [ "$1" = "release" ]; then
	make && make release
else
	make && make tar
fi
make clean -C test && make -C test
